s=0
i=1
while i<=100000:
  s=s+((-1)**(i-1))*(1/(2*i-1))
  i=i+1
pi=4*s
x=abs(pi-3.14159265358979323846264)
y=1-x/3.14159265358979323846264
print (pi)
print('精确度',y)